<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        padding: 0;
        margin: 0;
        box-sizing: border-box;
      }

      #app {
        width: 100%;
      }
      header,
      footer {
        background-color: #eee;
        height: 40px;
        line-height: 40px;
        text-align: center;
        width: 100%;
      }
      .fl {
        float: left;
      }

      .container {
        width: 100%;
        height: 400px;
        background-color: red;
      }
      .center {
        margin: 0 300px 0 400px;
        background-color: #fff;
        color: indianred;
        height: 300px;
      }
      .left {
        background-color: yellow;
        color: #000;
        text-align: center;
        width: 400px;
        height: 400px;
        margin-left: -100%;
      }
      .right {
        background-color: green;
        color: #fff;
        text-align: center;
        width: 300px;
        height: 400px;
        margin-left: -300px;
      }
      /* 手写clearfix */
      .clearfix::after {
        content: "";
        display: table;
        clear: both;
      }
      .bfc {
        overflow: hidden;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <header>我是头部</header>
      <div class="container fl">
        <div class="center">我是内容。。。。。</div>
      </div>
      <div class="left fl">我是侧边栏</div>
      <div class="right fl">我是右边的广告位</div>
      <footer class="bfc">我是尾部</footer>
    </div>
  </body>
</html>
